package com.smartleanx.module.hrm.service.esign.temp.po;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.smartleanx.framework.mybatis.core.dataobject.BaseDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * e签宝合同签署
 *
 * @author xzq
 * @since 2025-07-07 16:04:49
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(description = "e签宝合同签署")
@TableName("hrm_e_contract_task")
public class HrmEContractTask extends BaseDO implements Serializable  {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "数据状态 0/删除 1/正常")
    @TableField(value = "data_status", fill = FieldFill.INSERT)
    private Integer dataStatus;

    @Schema(description = "合同名称")
    @TableField("contract_name")
    private String contractName;

    @Schema(description = "合同模板id")
    @TableField("temp_id")
    private Long tempId;

    @Schema(description = "任务id")
    @TableField("sign_flow_id")
    private String signFlowId;

    @Schema(description = "任务状态")
    @TableField("task_status")
    private Integer taskStatus;

    @Schema(description = "pdf底稿id")
    @TableField("file_pdf_id")
    private String filePdfId;

    @Schema(description = "e签宝模板id")
    @TableField("e_sign_temp_id")
    private String eSignTempId;

    @Schema(description = "审批状态")
    @TableField("approval_status")
    private Integer approvalStatus;

    @Schema(description = "任务截止时间")
    @TableField("effective_duration")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date effectiveDuration;

    @Schema(description = "文件id")
    @TableField("file_id")
    private String fileId;

    @Schema(description = "合同备注")
    @TableField("contract_desc")
    private String contractDesc;

    @Schema(description = "合同编号")
    @TableField("contract_code")
    private String contractCode;

    @Schema(description = "租户id")
    @TableField("tenant_id")
    private Long tenantId;

    @Schema(description = "所属企业")
    @TableField("corp_id")
    private Long corpId;

    @Schema(description = "撤回原因")
    @TableField("revoke_reason")
    private String revokeReason;

    @Schema(description = "签署成功的文件地址")
    @TableField("success_file_url")
    private String successFileUrl;

    @Schema(description = "部门")
    @TableField("dept_id")
    private Long deptId;

    @Schema(description = "用户id")
    @TableField("user_id")
    private Long userId;

    @Schema(description = "审批流程id")
    @TableField("bpm_process_id")
    private String bpmProcessId;

    @Schema(description = "审批原因")
    @TableField("process_message")
    private String processMessage;

}
